public class Example3_8 {
   public static void main (String args[]){
     int a []={1,2,3,4};
     char b[]={'a','b','c','d'};
     for(int i=0;i<a.length;i++){
       System.out.println(a[i]);
     }
     for(int n =0;n<b.length;n++){
       System.out.println(b[n]);
     }
     for(int i :a){
       System.out.println(a[i]);
     }
     for(int ch:b){
        System.out.println(b[ch]);
     }
   }
}
